package com.hw.entity;

import com.hw.annotation.Column;
import com.hw.annotation.Id;

import java.util.Objects;

public class BookUsers {
    @Id
    @Column(name = "account")
    private String account;
    @Column(name = "password")
    private String password;

    public BookUsers() {
    }

    public BookUsers(String account, String password) {
        this.account = account;
        this.password = password;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BookUsers bookUsers = (BookUsers) o;
        return Objects.equals(account, bookUsers.account) &&
                Objects.equals(password, bookUsers.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(account, password);
    }
}
